home *** CD-ROM | disk | FTP | other *** search
Wrap
RISC OS BBC BASIC V Source | 1997-12-18 | 17.4 KB | 557 lines
--> CD Catalogue This program and all documentation David Holden 1995 A_$="1.40": 262343,D_%,E_% G_%:A%=1:B%=E_%:G%=H_%:H%=I_%: 262341,,E_% 262351,,L_%+100: L_%?108=4 :E_%!100=K_%: 262342,,E_%+100:M_%=N_%:O_%=P_%:Q_$=$R_% 262342,,E_%:I%= T_(0) 262342,,E_%:E_%!4=0: 262340,,E_%:I%= T_(0) 262342,,E_% W_(X_%,Y_%) 262364,E_%!24 17,18: E_%!16 262351,,E_%+&C0:d_%=E_%!&C8:e_%=E_%!&C4: E_%!4=-1 0:!E_%=G_%: 262342,,E_%:!E_%=U_%: 262342,,E_%:$f_%="CDview Help": g_(h_$+".!Help") d_%=1 262356,,i_%,j_%,k_% l_%,m_%:j_%=!E_%:e_%=E_%!4:d_%=E_%!8:m_%=E_%!12:l_%=E_%!16: l_%=n_% 1:P_%=O_%:N_%=M_%:$R_%=Q_$: o_(P_%) 2:k_%=228: 262356,,i_%,j_%-60,k_% 4:P_%=p_%+1:N_%=48: $(p_%+4)=".^" $R_%=h_$+".^" $R_%=$(p_%+4) o_(P_%) 263872: q_(l_%) 64,16:J%= r_(l_%,P_%):I%=J%+2: ?I%<33:I%+=1: :s_$=$R_%+"."+$I%: t_(K_%,l_%,J%) &416,&404:I%= r_(l_%,P_%)+2: ?I%<33:I%+=1: :s_$=$R_%+"."+$I% 263873 N_%=48 263872:A%=4:B%=P_%:C%=N_%:P_%= (J_%):N_%=P_%?1:I%=R_%+ ($R_%): ?I%<>46:I%-=1: :?I%=13: o_(P_%): 263873: r_(i%,p%): u_%:u_%=i%:p%= v_(p%): u_%>0: ?p%<>N_%:p%= v_(p%): v_(p%) v_(p%) :u_%-=1: q_(i%): w_%,u_%,x%,y%,x_%: r_(i%,P_%): ">":P_%=w_%:N_%+=1:w_%+=3: ?w_%<32:w_%+=1: :$R_%=$R_%+"."+$w_%: o_(P_%) y_(K_%,i%,0):I%=w_%+2: ?I%<33:I%+=1: :$f_%=$I%:s_$=$R_%+"."+$f_%:!E_%=G_%: 262342,,E_%:!E_%=U_%: 262342,,E_%:I%= T_(0): ?w_%<> !z_%=U_%: 262348,,z_%:$(z_%!76)=$f_%: 53,-1,11 ,,x%: 53,-1,4 ,,x_%:x%=x%<<x_%: 53,-1,12 ,,y%: 53,-1,5 ,,x_%:y%=y%<<x_%:!E_%=0:E_%!4=-(y%-40):E_%!8=x%-32:E_%!12=0: 262359,U_%,E_% __(&D94,s_$) g_(s_$) __(&AFF,s_$) __(&FF9,s_$) o_(p%): `_%,A`%,a$:`_%=-20:A`%=0: p%?2= "x" B`%= 263872:!z_%=K_%: 262348,,z_%:I%=z_%!88: I%>=0:!L_%=K_%:L_%!4=I%-1: 262340,,L_%:I%-=1: :I%=R_%+ ($R_%): ?I%<>46:I%-=1: :I%+=1:a$=$I%: a$="^" a$="$" U$(z_%!76)=a$:p%= v_(p%): 4:L_%!(I%+4)=C`%!I%: :!L_%=K_%: ?p%>=N_%: p%?1=N_%+1 D`(E`%,p%+2) :A%=3:B%=p%:C%=N_%:p%= (J_%) D`(E`%+64,p%+1):p%= v_(p%) D`(E`%+16,p%+1):p%= v_(p%) D`(E`%+32,p%+1):p%= v_(p%) D`(E`%+48,p%+1):p%= v_(p%) v_(p%) :`_%=-(A`% 2+A`% 2)*40-20: `_%>F`% `_%=F`% !L_%=0:L_%!4=`_%:L_%!8=274:L_%!12=0: 262359,K_%,L_%:!z_%=K_%: 262348,,z_%+1:z_%!24=0:z_%!28=-1: 262341,,z_%: 262353,-1,z_%!4,z_%!8,z_%!12,z_%!16+40: 263873: D`(i%,p%): ?p%<32 ?p%=120:p%+=1: :L_%!24=p%:L_%!28=i%: 262338,,L_%: L_%!4>200 >L_%!8=L_%!8-40:L_%!16=L_%!16-40:L_%!4=8:L_%!12=272:`_%-=40 :L_%!4=276:L_%!12=542 :A`%+=1: 8,17,h_$+".Cat_File" F%,,,,I_%: 1)<>1 I%= H`(1,"No catalogue data found - unable to continue"): I`% I_%+&20: 8,16,h_$+".Cat_File",I`%,0:A%=0:B%=I`%:C%=I_%: J_%:J`$=$I`%:p_%= v_(I`%):P_%=p_%+1:O_%=P_%:N_%=48:M_%=N_%:B`%= $(p_%+4)=".^" $R_%=h_$+".^" $R_%=$(p_%+4) MQ_$=$R_%:!E_%=K_%: 262347,,E_%:F`%=E_%!8-E_%!16: o_(P_%): 262341,,E_%: t_(w%,i%,p%): x%,y%:X_%=w%:Y_%=i%: 262351,,L_%:x%=!L_%-18:y%=L_%!4-9:!L_%=w%:L_%!4=i%: 262350,,L_%:!L_%=x%:L_%!4=y%:L_%!8=x%+36:L_%!12=y%+18: 271360,%11000101,1,"file_d94",L_% 271360,%11000101,1,"file_aff",L_% 271360,%11000101,1,"file_ff8",L_% 271360,%11000101,1,"file_fff",L_% 271360,%11000101,1,"directory",L_% W_(w%,i%): 271361:K`%=0:L_%!&80=w%:L_%!&84=i%: 262350,,L_%+&80:I%=(L_%!&9C): $(I%),"."):I%+=1: :f_$=$(I%): 262351,,L_%:L_%!20=L_%!12:L_%!24=L_%!16:L_%!28=!L_%:L_%!32=L_%!4:L_%!16=1:$(L_%+44)=f_$ @!L_%=( (f_$)+49) 3:L_%!12=0: 262375,17,L_%,L_%!20,L_%!24: f$,d$,i$,i%,L`%: "Closearchive cd_dir_arc": :i%=E_%+44: ?i%>31:i%+=1: ?i%<>46:i%-=1: :?i%=13:d$=$(E_%+44):$L_%=s_$:i%=L_%+ ?i%<>46:i%-=1: :?i%=13:f$=$L_%:!z_%=K_%: 262348,,z_%:i%=z_%!88: i%>=0: N`(K_%,i%)= i$="."+ O`(K_%,i%): 5,"openarchive "+$R_%+" cd_dir_arc":f$="arcfs#cd_dir_arc:$":M`%= 8,5,f$+i$ ,,L`%,,I_%:L`%=(L`%>>8) &FFF: L`%=&3FB I_%<&C000 5,"openarchive "+f$+i$+" cd_dir_arc":f$="arcfs#cd_dir_arc:$":M`%= "copy "+f$+i$+" "+d$+i$+" RQ~V~C": "Closearchive cd_dir_arc":M`%= y_(K_%,i%,0) :i%-=1: y_(w%,i%,s%):!L_%=w%:L_%!4=i%:L_%!8=s%<<21:L_%!12=1<<21: 262349,,L_%: O`(w%,i%):!L_%=w%:L_%!4=i%: 262350,,L_%:I%=(L_%!28): ?I%>31:I%+=1: :?I%=13:=$(L_%!28) N`(w%,i%):!L_%=w%:L_%!4=i%: 262350,,L_%: (L_%!24 1<<21):= T_(P`%): 262380,Q`%+P`%,-1 e%>=(Q`%+P`%):= 262380,Q`%,-1:= S`,T`,U`,V`,m%:T`=1:S`=2:V`=4:U`=&80: W`%&200:m%=W`%:i_%= X`(m%,"CDview",180):m%= Y`("Help",0,0):m%= Y`("Info",0,Z`%):m%= Y`("Quit",U`,0): X` (a%,a`$,b`%):$a%=a`$:a%!12=&70207:a%!16=b`%:a%!20=40:a%!24=0:m%=a%+28:=a% Y` (c`$,d`%,e`%):!m%=d`%:m%!4=e`%:m%!8=&7000001:$(m%+12)=c`$:=m%+24 f` (g`$,h`%,i`$): j`% 24:$j`%="s!"+g`$:$(j`%+16)=i`$:!E_%=h`%:E_%!4=0:E_%!8=-24:E_%!12=80:E_%!16=80:E_%!20=&1700210B:E_%!28=j`%:E_%!24=j`%+16:E_%!32=8: 262338,,E_% I%:=I% v_(p%): :p%+=1: ?p%=10 ?p%=13:=p%+1 C_(k`$,l`%): 263874:D_%=&C31:!L_%= :$(L_%+4)="Error "+ )+": "+k`$++ 262367,L_%,1,m`%: 262365,n`%,&4B534154: H`(o`%,a$):L_%!&80=0:$(L_%+&84)=a$+ 262367,L_%+&80,16 o`%,m`% ,I%:=I% J_%&500: 2:P%=J_%:[OPT q`:adr r8,r`:mov r0,r0,lsl#2:ldr pc,[r8,r0]:.s` equd 0;return data at code%+12:equd 0 t/.r` equd t`:equd u`:equd v`:equd w`:equd S_ ; r1=ptr, r2=level, exit with r0=ptr:.w`:mov r0,r1;put ptr in r0 ready for return:.x` ldrb r1,[r0],#1;look for line beginning with 'level' charater:cmp r1,#13:cmpne r1,#10:bne x`:ldrb r1,[r0]:cmp r1,r2:bne x` e.x` ldrb r1,[r0],#1;skip the line with the level number:cmp r1,#13:cmpne r1,#10:bne x`:mov pc,r14 ; r1=ptr, r2=level, exit with r0=ptr:.S_ mov r0,r1;transfer ptr to r0:.x` ldrb r1,[r0,#-1]!;look for end of prev line:cmp r1,#13:bne x`:ldrb r1,[r0,#1];get sol char:cmp r1,#62;if it's not '>' carry on:bne x` uldrb r1,[r0,#2];get char after '>':cmp r1,r2;if it's < level all done:bge x`:add r0,r0,#1;point to sol:mov pc,r14 ;enter with r1 points to text, r2=length:.v` add r2,r1,r2:mov r0,#32;start with 32 in case there's no final cr:.x` ldrb r3,[r1],#1:cmp r1,r2:movgt pc,r14:cmp r3,#10:cmpne r3,#13:bne x`:ldrb r11,[r1];get char after eol Badd r11,r11,r3:cmp r11,#23:addeq r1,r1,#1:add r0,r0,#32:bal x` ;enter with r1 points to text, r2=length:.t` add r2,r1,r2:.x` ldrb r0,[r1],#1:cmp r0,#10:moveq r0,#13:streqb r0,[r1,#-1]:cmp r1,r2:blt x`:mov pc,r14 ;enter with r1=blk, r6=text, r7=text length:.u` stmfd r13!,{r14}:add r7,r7,r6;r7 now = end of text:ldr r2,y`;get window handle:str r2,[r1]:swi "Wimp_RedrawWindow":.z` cmp r0,#0:ldmeqfd r13!,{pc}:ldr r0,[r1,#4]:ldr r2,[r1,#20] asub r8,r0,r2:add r8,r8,#16:ldr r0,[r1,#16]:ldr r2,[r1,#24]:sub r9,r0,r2;r9 = top of work area ldr r3,[r1,#40];get top of graphics window:sub r3,r9,r3;r3 = offset from top:mov r3,r3,lsr#5;divide by 32 = number of lines:mov r2,r3,lsl#5:sub r9,r9,r2:mov r2,r6;point to text:subs r3,r3,#1:bmi _` .`` ldrb r0,[r2],#1;count down to required line:cmp r0,#13:cmpne r0,#10:bne ``:ldrb r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r3,r3,#1 bpl `` ._` ldr r4,[r1,#40];get graphics window max y:ldr r3,[r1,#32];get graphics window min y:sub r5,r4,r3;r5=height:mov r5,r5,lsr#5;divide by 5 = num lines:add r5,r5,#1;+1:sub r9,r9,#4;allow 4 points gap at top:bl Aa z.Ba cmp r2,r7:bgt Ca;at end of text:ldrb r0,[r2],#1:cmp r0,#31:swigt "OS_WriteC":bgt Ba:cmp r0,#10:cmpne r0,#13:beq Da ;check for tab here bal Ba .Da ldr r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r5,r5,#1;dec line count:bmi Ca;graphics window redrawn, get next bsub r9,r9,#32;move down a line:bl Aa:bal Ba;print next line:.Ca swi "Wimp_GetRectangle":bal z` .Aa swi 256+25:swi 256+4:mov r0,r8:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":mov r0,r9:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":movs pc,r14 .y` equd G_% .Ea% equd 0:.Fa% equd 0:.Ga% equd 0:.Ha% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ia% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ja% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0 equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ka% equd 0:.La% equd 0:.Ma% equd 0:.Na% equd-1:.Oa% equd 0:.Pa% equd 0:.Qa% equd 0:.Ra% equd 0:.Sa% equd 0:.Ta% equd 255 :<equs "Unable to resize block for ArtWorks!":equb 0:align .Ua cmp r11,#0:stmfd r13!,{r4-r8,r14}:andne r5,r15,#(%1101<<28):teqnep r15,r5:ldmnefd r13!,{r4-r8,pc}:mov r1,#0:sub r1,r1,#1:cmp r0,r1:beq Va:ldmltfd r13!,{r4-r8,pc}:.Wa str r0,Ea%:ldr r3,La%:sub r3,r3,#&8000:add r3,r3,r0 mov r0,r3:swi "Wimp_SlotSize":cmp r3,r0:bgt Xa:ldr r0,La%:ldr r1,Ea%:str r1,Ma%:ldr r2,Na%:ldr r3,Oa%:and r5,r15,#(%111<<29): make sure V is clear teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Xa:adr r0,Ta%:orr r5,r15,#1<<28:teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Va:ldr r0,La%:ldr r1,Ma%:ldr r2,Na%:ldr r3,Oa%:ldmfd r13!,{r4-r8,pc}:.Fa stmfd r13!,{r14}:swi "XAWRender_FileInitAddress" str r0,Fa%:ldr r0,La%:mov r12,r1:adr r1,Ua:ldr r2,Ma%:adr r14,Ya:ldr pc,Fa%:.Ya swivs "OS_GenerateError":str r0,Ma%:ldmfd r13!,{pc}:.Ga stmfd r13!,{r14}:swi "XAWRender_RenderAddress":str r0,Ga%:ldr r0,Na%:mov r12,r1 adr r1,Ha%:adr r2,Ia%:adr r3,Ja%:ldr r4,La%:adr r5,Ua:ldr r6,Ka%:mov r7,#0:adr r14,Za:ldr pc,Ga%:.Za swivs "OS_GenerateError":ldmfd r13!,{pc}:.aa stmfd r13!,{r14}:ldr r0,Na%:swi "XAWRender_DocBounds":str r2,Pa%:str r3,Qa% /str r4,Ra%:str r5,Sa%:ldmfd r13!,{pc}:]: ba (ca%): da% ca%,ea%&100:E%=da%+ca%: 262361,,h_$+".templates": 262363,,H_%,da%,E%,-1,"info",0 ,,R%: 262337,,H_% 262363,,H_%,R%,E%,-1,"file",0 ,,R%: 262337,,H_% 262363,,H_%,R%,E%,-1,"text",0 262337,,H_% 262363,,H_%,R%,E%,-1,"pic",0 ,,R%: 262337,,H_% 262362:!E_%=Z`%:E_%!4=1: 262350,,E_%:$(E_%!28)=fa$:!E_%=Z`%:E_%!4=2: 262350,,E_%:$(E_%!28)=ga$:!E_%=Z`%:E_%!4=3: 262350,,E_%:$(E_%!28)=ha$ E!E_%=K_%:E_%!4=0: 262350,,E_%:J%=E_%+8: 32:C`%!I%=J%!I%: 262336,200,&4B534154,"CDview" ia%,n`%: ia%<300 0,"This program requires RISC-OS 3 or better": E_%&180,L_%&100,m`% 24,R_%&100,f_% 15: C`%&28,E`%&60,z_%&B000:$m`%="CDview": $+" During initialisation", -&8000:H_%= 35,"CDview$Dir",E_%,256,0,3 ,,I%:E_%?I%=13:h_$=$E_%: T_(&1000)= H`(1,"Not enough memory available to run !CDview"): ba(&400): G`:n_%= f`("CDview",-1,J`$): R`:I%= T_(0): ja:$E`%="Ssmall_dir":$(E`%+16)="Ssmall_FFF":$(E`%+32)="Ssmall_FF9":$(E`%+48)="Ssmall_AFF":$(E`%+64)="Ssmall_D94":$(E`%+80)="Ssmall_FF9":fa$="CDview v0.13":ga$="David Holden":ha$=" A.P.D.L. 1995":D_%=%110000110001:F`%=-550 ka%&300,la 24,ma% 13,na% 15,oa% 255: pa:qa%= g_(ra$): "Closearchive cd_dir_arc": 5,"openarchive "+$R_%+" cd_dir_arc":ra$="arcfs#cd_dir_arc:$."+$f_%:M`%= 8,17,ra$ F%,,,,I_%: 1)<>1 100,"File not found.": T_(I_%+20)= H`(1,"Not enough memory available to load this file"): "Closearchive cd_dir_arc":M`%= :!z_%=G_%: 262348,,z_%:$(z_%!76)=$f_%: 8,16,ra$,H_%,0: "Closearchive cd_dir_arc":M`%= H_%!I_%=&0A0A0A0A:A%=2:B%=H_%:C%=I_%:sa%= (J_%):!E_%=0:E_%!4=-sa%:E_%!8=1232:E_%!12=0: 262359,G_%,E_%:!E_%=G_%: 262347,,E_%:E_%!20=0:E_%!24=0:E_%!28=-1: 262341,,E_%: __(ta%,ua$): va%,wa%,xa%,L`%: ya%,g`%,za%: "Closearchive cd_dir_arc": Get file length 5,"openarchive "+$R_%+" cd_dir_arc":ua$="arcfs#cd_dir_arc:$."+$f_%:M`%= 8,5,ua$ ,,L`%,,I_%:L`%=(L`%>>8) &FFF: L`%=&3FB 5,"openarchive "+ua$+" cd_dir_arc":ua$="arcfs#cd_dir_arc:$."+$f_%:M`%= 8,5,ua$ ,,,,I_% :!z_%=U_%: 262348,,z_%: If window has an icon, delete it z_%!88>0 ,!E_%=U_%:E_%!4=0: 262340,,E_%:I%= T_(0) Get size of window Iva%=z_%!12-z_%!4:wa%=z_%!16-z_%!8: Calculate space needed for sprite Lxa%= _a(va%, ,ya%): Grab space, initialise sprite area(s) and load file T_(ya%+I_%+8)=0 I%= H`(1,"Not enough memory available to load this file"): /g`%=H_%:za%=g`%+ya%: `a(g`%,ya%): ta%=&FF9 `a(za%,I_%+8): 46,10+256,za%,ua$ 8,255,ua$,za% "Closearchive cd_dir_arc":M`%= Make the sprite Ab(ta%,za%,I_%,$f_%,g`%,xa%, Bb(g`%, Add the sprite to the window !E_%=U_%:E_%!4=0:E_%!12=va%:E_%!8=-va%:E_%!16=0:E_%!20=&0700A11A:E_%!24=f_%:E_%!28=g`%:E_%!32= ($f_%): 262338,,E_%: Open the window c!E_%=U_%: 262347,,E_%:E_%!28=-1: 262341,,E_%: 262353,-1,E_%!4,E_%!8,E_%!4+va%,E_%!8+va%+40: Ab(ta%,Cb%,Db%,Eb$,Fb%,Gb%,Hb%): r0%,r1%,r2%,r3%: Ib%,Jb%,I%: Kb%,Lb%,Mb%,Nb%,Ob%,Pb%,Qb%: Rb(Hb%,Kb%,Lb%,Mb%,Nb%,Ob%,Pb%,Qb%): Kb%>=63 Ib%=0 Ib%=1 Create a sprite 131118,15+256,Fb%,Eb$,Ib%,Gb% Mb%,Gb% Ob%,Hb%: Divert output to it 'g!ka%=0: 131118,60+256,Fb%,Eb$,ka% r0%,r1%,r2%,r3%: 46,r0%,r1%,r2%,r3%:I%= T_(0): Give the sprite a palette (if less than 63 colours) 131118,24+256,Fb%,Eb$ ,,Jb%: 4:Jb%!(44+I%*2)=Sb%!I%:Jb%!(44+I%*2+4)=Sb%!I%: 4:Jb%!(44+I%*2)=Tb%!I%:Jb%!(44+I%*2+4)=Tb%!I%: 4:Jb%!(44+I%*2)=Ub%!I%:Jb%!(44+I%*2+4)=Ub%!I%: 264016: Make white background Vb(&FFFFFF00): 0,0,Gb%: Call appropriate sub-routine &FF9: Wb(Cb%,1,Hb%,0,0,Gb%,Gb%) &AFF,&CC3: Xb(Cb%,Gb%,Db%) &D94: Yb(Cb%,Gb%,Db%) Restore output back to screen 46,r0%,r1%,r2%,r3%: 264016: H`(1,"Unable to display this Artworks file."):qa%= Wb(Zb%,ab%,Hb%,bb%,cb%,db%,eb%): fb%,gb%,hb%,Kb%,Lb%,ib%,Nb%,jb%,Pb%,Qb%,Mb%,Ob%: kb,lb,mb,nb,ob,pb,qb%: rb%,sb%,tb%,ub%,vb%: 46,13+256,Zb%,ma%,13,ab%: 131118,40+256,Zb%,ma% ,,,fb%,gb%,,hb% Rb(hb%,tb%,Lb%,ib%,Nb%,jb%,Pb%,Qb%):kb=fb%*ib%:na%!0=ib%*256:lb=gb%*jb%:na%!4=jb%*256: kb<>0 lb<>0 U*mb=db%/kb:nb=eb%/lb: mb<nb nb=mb mb=nb Rb(Hb%,ub%,Lb%,Mb%,Nb%,Ob%,Pb%,Qb%): mb<>0 na%!8=Mb%*256/mb nb<>0 na%!12=Ob%*256/nb 46,24+256,Zb%,ma% ,,qb%: qb%!32<>44 qb%!32-52 8:wb%!(I%/2)=qb%!(I%+44): :rb%=wb% 15:rb%=Sb% 3:rb%=Tb% 1:rb%=Ub% :rb%=0 15:sb%=Sb% 3:sb%=Tb% 1:sb%=Ub% :sb%=0 tb%>255 p vb%=0 :vb%=oa%: qb%!32<>44+2048 264000,hb%,rb%,Hb%,sb%,oa% 264006,rb%!(Q%<<2),Hb%,sb% oa%?Q%: :ob=(db%-mb*kb)/2+bb%:pb=(eb%-nb*lb)/2+cb%: 46,52+256,Zb%,ma%,ob,pb,8,na%,vb% Xb(Cb%,Gb%,Db%): kb,lb,mb,nb,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